package com.atguigu.gmall.pms.service;

import com.atguigu.gmall.pms.vo.SpuVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.gmall.common.bean.PageResultVo;
import com.atguigu.gmall.common.bean.PageParamVo;
import com.atguigu.gmall.pms.entity.SpuEntity;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * spu信息
 *
 * @author daddy
 * @email daddy@atguigu.com
 * @date 2021-11-01 18:54:48
 */
public interface SpuService extends IService<SpuEntity> {

    PageResultVo queryPage(PageParamVo paramVo);

    PageResultVo querySpuByCidAndPage(Long categoryId, PageParamVo pageParamVo);

    void BigSave(SpuVo spuVo);
    //保存sku及营销信息
//    @Transactional
    void saveSku(SpuVo spuVo, Long spuId);
    //保存基础属性
//    @Transactional
    void saveBaseAttr(SpuVo spuVo, Long spuId);
    //保存spu描述信息
//    @Transactional(propagation = Propagation.REQUIRES_NEW)
    void saveSpuDesc(SpuVo spuVo, Long spuId);
    //保存spu基础信息
//    @Transactional(propagation = Propagation.REQUIRED)
    Long saveSpu(SpuVo spuVo);
}

